import 'package:flutter/material.dart';

import '../../../utils/tools/localstorage_tool.dart';

/// ### 控制页面跳转
/// #### [equipmentId] 必填|String|台区id
/// #### [equipmentName] 必填|String|台区名称
void routerSwitch(BuildContext context, String equipmentId, String equipmentName) async {
  await LocalStorage.setFormat("equipmentInfo", {
    "equipmentId": equipmentId,
    "equipmentName": equipmentName
  });
  // 跳转layoutview
  Navigator.pushNamedAndRemoveUntil(context, "/layoutview", (_) => false);
}